package com.xzbd.gef.view;

import java.awt.Label;

import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.XYLayout;
import org.eclipse.draw2d.geometry.Rectangle;

public class RootNodeFigure extends Figure {

	private Label labelName = new Label();
	private Label labelAddress = new Label();
	private Label labelVersion = new Label();
	private Label labelDate = new Label();
	private Label labelAuthor = new Label();

	private XYLayout layout;

	public RootNodeFigure() {
		layout = new XYLayout();
		setLayoutManager(layout);

		setForegroundColor(ColorConstants.black);
	}

	public void setLayout(Rectangle rect) {
		setPreferredSize(rect.width, rect.height);
		setBounds(rect);
	}

	public void setName(String text) {
		labelName.setText(text);
	}

	public void setAddress(String text) {
		labelAddress.setText(text);
	}

	public void setVersion(String text) {
		labelVersion.setText(text);
	}

	public void setDate(String text) {
		labelDate.setText(text);
	}

	public void setAuthor(String text) {
		labelAuthor.setText(text);
	}

}
